using UnityEngine.Events;

namespace MaterialUI
{
	public static class UnityEventExtension
	{
		public static void InvokeIfNotNull(this UnityEvent unityEvent)
		{
			unityEvent?.Invoke();
		}

		public static void InvokeIfNotNull<T>(this UnityEvent<T> unityEvent, T parameter)
		{
			unityEvent?.Invoke(parameter);
		}
	}
}
